package demo3;

public class QuestionThree {
    public static String register(String email,String password){
        boolean emailCheck = email.matches("[a-zA-Z]{5}@(163|126)\\.com(\\.cn)?");
        boolean passwordCheck = password.matches("\\d{6,}");
        if (emailCheck && passwordCheck){
            return "信息正确";
        }else if (emailCheck && !passwordCheck){
            return "密码不符合要求";
        }else if (!emailCheck && passwordCheck){
            return "邮箱地址不符合要求";
        }else {
            return "密码，邮箱地址不符合要求";
        }
    }
}
